<template>
  <div>
    <!-- 商品列表区 -->
    <div class="goods-list">
      <div class="goods-item">
        <img src="/src/images/1.jpg" alt="" />
        <h1 class="title">精简版UFO 限量特惠</h1>
        <div class="info">
          <p class="price">
            <span class="new">￥2199</span>
            <span class="old">￥2699</span>
          </p>
          <p class="sell">
            <span>热卖中</span>
            <span>剩余60件</span>
          </p>
        </div>
      </div>
      <div class="goods-item">
        <img src="/src/images/1.jpg" alt="" />
        <h1 class="title">精简版UFO 限量特惠</h1>
        <div class="info">
          <p class="price">
            <span class="new">￥2199</span>
            <span class="old">￥2699</span>
          </p>
          <p class="sell">
            <span>热卖中</span>
            <span>剩余60件</span>
          </p>
        </div>
      </div>
      <div class="goods-item">
        <img src="/src/images/1.jpg" alt="" />
        <h1 class="title">精简版UFO 限量特惠</h1>
        <div class="info">
          <p class="price">
            <span class="new">￥2199</span>
            <span class="old">￥2699</span>
          </p>
          <p class="sell">
            <span>热卖中</span>
            <span>剩余60件</span>
          </p>
        </div>
      </div>
      <div class="goods-item">
        <img src="/src/images/1.jpg" alt="" />
        <h1 class="title">精简版UFO 限量特惠</h1>
        <div class="info">
          <p class="price">
            <span class="new">￥2199</span>
            <span class="old">￥2699</span>
          </p>
          <p class="sell">
            <span>热卖中</span>
            <span>剩余60件</span>
          </p>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
.goods-list {
  //设置父盒子为弹性盒模型
  display: flex;
  //默认flex布局的盒子，内部的子元素不会换行，可以使用下面的属性使其换行
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 10px;
  padding-top: 12px;
  .goods-item {
    width: 49%;
    border: 1px solid #ccc;
    margin-top: 6px;
    box-shadow: 0 0 7px #ccc;
    padding: 3px;
 
    img {
      width: 100%;
    }
    .title{
        font-size: 17px;
    }
    .info{
        background-color: #eee;
        overflow: hidden;
        p{
            margin: 3px;
           margin-left: 10px;
           margin-right: 10px;
        }
        .price{
            .new{
        color: red;
        font-size: 16px;
        font-weight: bold;
        margin-right: 15px;
            }
            .old{
                text-decoration: line-through;
                font-size: 12px;
            }
        }
        .sell{
            display:flex ;
            justify-content: space-between;
            font-size: 13px;
        }
    }
  }
}
</style>